﻿CREATE PROCEDURE [branding].[GetValueObjects]
	@tag varchar(50),
	@subTag varchar(50)
AS
	select	bv.ID,
			CAST('value' as varchar(10)) as ObjectType,
			bv.Tag,
			bv.SubTag,
			bv.ResourceId,
			bv.Brand,
			bv.ContentLength
	from	branding.Value as bv
	where	(@tag is null or @tag = Tag) and
			(@subTag is null or @subTag = SubTag)
	order   by ResourceId;
RETURN 0